import Api from "/@/api/Api";

import ApiConfig from "/@/api/ApiConfig";
import {UnwrapRef} from "vue";

export default class DictApi extends Api {
    static getPage(params: Object) {
        return this.get({
            url: ApiConfig.SYSTEM.DICT_PAGE,
            params: params
        });
    }

    static getList(params: any) {
        return this.get({
            url: ApiConfig.SYSTEM.DICT_LIST,
            params: params
        });
    }



    static insert(dict: RowDicType) {
        return this.post({
            url: ApiConfig.SYSTEM.DICT,
            data: dict,
        });
    }

    static update(dict: RowDicType) {
        return this.put({
            url: ApiConfig.SYSTEM.DICT,
            data: dict
        });
    }

    static view(id: string) {
        return this.get({
            url: ApiConfig.SYSTEM.DICT,
            params: {id: id}
        });
    }

    static remove(ids: string) {
        return this.delete({
            url: ApiConfig.SYSTEM.DICT,
            params: {ids: ids}
        });
    }
    static getDictStore(){
        return this.get({
            url: ApiConfig.SYSTEM.DICT_PAGE,
        });
    }
}